cmake_minimum_required(VERSION 3.10)

project(nlc)

set(PROJECT_ROOT ${CMAKE_SOURCE_DIR}/)

include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_SOURCE_DIR}/)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE  ${CMAKE_SOURCE_DIR}/bin/release)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG    ${CMAKE_SOURCE_DIR}/bin/debug)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE  ${CMAKE_SOURCE_DIR}/bin/release)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG    ${CMAKE_SOURCE_DIR}/bin/debug)

include(lib/cmake/openmp.cmake)
include(lib/cmake/opengl.cmake)
include(lib/cmake/glm.cmake)
#include(lib/cmake/glfw.cmake)
#include(lib/cmake/glew.cmake)
include(lib/cmake/freeglut.cmake)
include(lib/cmake/assimp.cmake)
include(lib/cmake/opencv.cmake)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

if(WIN32)
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MD")
elseif(UNIX)
    list(APPEND LINK_LIBS stdc++fs)
endif()

add_subdirectory(src)
add_subdirectory(otf)